
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/static/bootstrap-5.1.3-dist/css/bootstrap.css">
    <script type="text/javascript" src="/static/bootstrap-5.1.3-dist/js/bootstrap.js"></script>
    <title>发帖页面</title>
</head>
<style>
    .back{
        position: absolute;
        font-size: 26px;
        top:30px;
        left:40px;
        text-decoration: none;
        color: #000;
        font-weight: bold;
    }
    .back:hover{
        color: #000;
    }

    h2{
        text-align: center;
        margin-top: 15px;
    }

    .card{
        width: 1400px;
        height: 700px;
        background-color: #fffdfd;
        border-radius: 30px;
        border: none;
        box-shadow: 5px 5px 10px #adabab;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
    }

    .mod{
        padding: 30px 300px;
    }
    .mb-3{
        padding-bottom: 30px;
    }
    .btn button:nth-child(1){
        margin-right: 50px;
    }
</style>
<body>
<a href="${pageContext.request.contextPath}/post_list" class="back">
    <span><</span>返回</a>
<h2>添加帖子</h2>
<div class="card">
    <form  action="add_post" method="post" enctype="multipart/form-data" class="mod">
        <div class="form-floating mb-3">
            <input class="form-control" id="floatingTitle" type="text" name="title" required lay-verify="required" placeholder="帖子主题" autocomplete="off">
            <label for="floatingTitle">帖子主题</label>
        </div>
        <div class="form-floating mb-3">
            <input class="form-control" id="floatingContent" type="text" name="content" required lay-verify="required" placeholder="帖子内容" autocomplete="off">
            <label for="floatingContent">帖子内容</label>
        </div>
        <div class="form-floating mb-3">
            <input class="form-control" id="floatingPetname" type="text" name="petname"  required lay-verify="required" placeholder="宠物名字" autocomplete="off">
            <label for="floatingPetname">宠物名字</label>
        </div>
        <div class="form-floating mb-3">
            <input class="form-control" id="floatingPetkind" type="text" name="petkind" required lay-verify="required" placeholder="宠物品种" autocomplete="off">
            <label for="floatingPetkind">宠物品种</label>
        </div>
        <div class="form-floating mb-3">
            <input class="form-control" id="floatingDescription" type="text" name="description" required lay-verify="required" placeholder="宠物描述" autocomplete="off">
            <label for="floatingDescription">宠物描述</label>
        </div>
        <div class="mb-3 row">
            <label class="col-sm-2 col-form-label">上传宠物图片</label>
            <div class="col-sm-10">
                <input class="form-control" type="file" name="photo">
            </div>
        </div>
        <div class="mb-3 row">
            <div class="btn">
                <button type="submit" class="btn btn-outline-success btn-lg">发 布</button>
                <button type="reset" class="btn btn-outline-dark btn-lg">重 置</button>
            </div>
        </div>
    </form>
</div>
</body>
</html>